package Agency.views;
import java.awt.Color;
import javax.swing.JButton;


/**
 *
 * @author wangari
 */
public class TenantsView extends javax.swing.JFrame {

    /**
     * Creates new form TenantsView, and sets the color of the form to light grey
     */
    public TenantsView() {
        this.getContentPane().setBackground(Color.LIGHT_GRAY);
        initComponents();
        setLocationRelativeTo(null);
        }
    /**
     * A button to add a new tenant
     * @return jBAddTenant
     */
    public JButton addTenant(){
        return jBAddTenant;
    }
    /**
     * returns a button that deletes a tenant
     * @return  jBDeleteTenant
     */
    public JButton deleteTenant(){
        return jBDeleteTenant;
    }
    /**
     * a method that returns a button to edit tenants information
     * @return jBEditTenant
     */
    public JButton editTenant(){
        return jBEditTenant;
    }
    /**
     * method returns a button to search for a tenant
     * @return jBSearchTenant
     */
    public JButton  searchTenant(){
        return jBSearchTenant;
    }
    /**
     * Button to view all tenants occupying the houses
     * @return jBViewAllTenants
     */
    public JButton  viewAllTenants(){
        return jBViewAllTenants;
    }
    /**
     * button to manage houses
     * @return jBManageHouses
     */
    public JButton manageHouses(){
       return  jBManageHouses;
    }
    /**
     * button to close the page
     * @return jBClose
     */
    public JButton closeTheView(){
        return jBClose;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jBAddTenant = new javax.swing.JButton();
        jBDeleteTenant = new javax.swing.JButton();
        jBEditTenant = new javax.swing.JButton();
        jBSearchTenant = new javax.swing.JButton();
        jBViewAllTenants = new javax.swing.JButton();
        jBManageHouses = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jBClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jBAddTenant.setText("Add Tenant");

        jBDeleteTenant.setText("Delete Tenant");

        jBEditTenant.setText("Edit Tenant Information");

        jBSearchTenant.setText("Search Tenant");
        jBSearchTenant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBSearchTenantActionPerformed(evt);
            }
        });

        jBViewAllTenants.setText("View All Tenants");

        jBManageHouses.setText("Manage Houses");

        jLabel1.setText("Administrator");

        jBClose.setText("Close");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(35, 35, 35)
                                .addComponent(jBAddTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(26, 26, 26)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jBViewAllTenants, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jBEditTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(73, 73, 73)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jBSearchTenant, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                                .addComponent(jBManageHouses, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(jBDeleteTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(204, 204, 204)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jBClose)
                            .addComponent(jLabel1))))
                .addContainerGap(82, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGap(24, 24, 24)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBDeleteTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBAddTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(49, 49, 49)
                        .addComponent(jBEditTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(40, 40, 40)
                        .addComponent(jBSearchTenant, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(58, 58, 58)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBViewAllTenants, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBManageHouses, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jBClose)
                .addContainerGap(32, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jBSearchTenantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBSearchTenantActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBSearchTenantActionPerformed

    


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBAddTenant;
    private javax.swing.JButton jBClose;
    private javax.swing.JButton jBDeleteTenant;
    private javax.swing.JButton jBEditTenant;
    private javax.swing.JButton jBManageHouses;
    private javax.swing.JButton jBSearchTenant;
    private javax.swing.JButton jBViewAllTenants;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
